let tableInstance
import {
  getTemplateInstance
} from '@admin/utils/index'

export default {
  // 73 105还原关闭后还原common-page
  _resetTableInstance(current) {
    tableInstance = getTemplateInstance(current)
  },
  _setTableInstance(instance) {
    tableInstance = instance
  },
  // 刷新
  refresh() {
    tableInstance.getList()
  },
  // 强制刷新
  forceRefresh() {
    tableInstance.getList(true)
  },
  // 获取table实例
  getInstance() {
    return tableInstance
  },
  getTableData() {
    const instance = this.getInstance()
    return instance.tableData
  }
}
